package 题目集.动态规划.背包问题;

import java.util.Scanner;

/**
 * https://www.acwing.com/problem/content/902/ 给你一个整数n，问组合成n的方案有多少种。
 * 方案1：把1...n看一个价值为1...n的完全背包问题
 */
public class demo01_整数划分 {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		int n = sc.nextInt();
		int res = dp1(n);
		System.out.println(res);
	}
	static final int mod=(int) (1e9+7);

	public static int dp1(int n) {
		int[][] dp = new int[2][n + 1];
		int pre, cur = 0;
		dp[0][0] = 1;
		for (int i = 1; i <= n; i++) {
			pre = cur;
			cur = (cur + 1) % 2;
			for (int j = 0; j <= n; j++) {
				dp[cur][j] = dp[pre][j];
				if (j >= i) {
					dp[cur][j] +=dp[cur][j - i];
				}
				dp[cur][j]%=mod;
			}
		}
		return dp[cur][n]%mod;
	}
}
